The present invention relates to file systems for storing and managing data files on a storage medium.
File systems are used for managing files on a storage device, for example, on a hard disc drive, floppy disc drive, flash memory, or rewritable optical media. In order to find a file, the file system usually comprises a file allocation database (e.g., the file allocation table (FAT) for Microsoft® Disk Operating Systems (MSDOS)). A typical approach thereby is, that upon generation of a new file, information is stored within the file allocation database in order to localize the file and in order to prevent overwriting of the file by other data. In most file systems, said information is stored by means of pointers, i.e., variables that indicate an address on the storage device.
In a simple example according to the state of the art, a file is written in an non-fragmented segment of the storage device and a pointer indicating the beginning of the file and another pointer indicating the end of the file is written within the file allocation database. The information within the pointers is used to access the file and to prevent that the data file is overwritten by other data.
However, in nowadays computer systems, files often are fragmented and get increasingly fragmented by writing new files and changing files on the storage device. This is especially the case for incremental files. Incremental files are files that grow in steps, for example by appending new information to an existing file. A typical example of incremental files are log-files. When new data is to be appended to an existing file, it might happen that the memory adjacent to the existing file is not free anymore, since between generation of the file and appending new information to the file, other data might have been written on the memory. State of the art file systems therefore write data that is to be appended to a file into a free segment that does not necessarily immediately adjoin to the existing file.
In order to prevent overwriting of a fragmented file, the file system therefore has to keep track of the file fragments, which is usually done by mapping the segmentation onto the file allocation database. However, fragmentation of the files on the storage device results in decreased performance. Known operating systems delegate this problem of the decreased performance to the file system maintenance, in particular to disc defragmentation tools.
However, for a large storage device, defragmentation tools need considerable time for defragmentation. A drawback of this solution is, that during the process of defragmentation a computer system should not be used for other purposes, since an error in the defragmentation process can result in data loss and in an unstable operating system.
An additional drawback of state of the art file systems is that in case information is appended to a file, the file allocation database needs to be updated in order reserve the memory space taken by the additional data, thus preventing the additional data to be overwritten by other files.